<?php
defined ( '_FW_EXEC' ) or die ( 'Restricted access' );
RClassesImporter::cls("dbo.dtos.SettingDTO" );

class SettingModel {
	
	function delete($arrId) {
		$result = false;
		if (is_array($arrId)) {
			$arrId = implode(',', $arrId);
		}
		$sQuery		=	"DELETE FROM setting  WHERE id IN ({$arrId}) ";
		return SysDatabase::execute( $sQuery );
	}	
	
	function getSettingDetails($id) {
		$my_Obj = new SettingDTO();
		$my_Obj->setKeyValue($id);
		SysDatabase::fillData($my_Obj);
		return $my_Obj;
	}
	function loadSettingDetail($id){
		$sql= "SELECT * FROM setting WHERE id = '$id'";
		return SysDatabase::loadObject($sql);		
	}
	
	function saveSettingDTO($dto){
		return SysDatabase::saveDTO($dto);
	}
		
	
	function getTranscationLog($id) {
		$finder = new TranscationFinder();
		$finder->member_id = $id;
		return SysDatabase::getSelectResult($finder->getSelectSQL());
	}
}
?>